package com.liugui.iostream;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;

/**
 * @ClassName: MoveDemo
 * @Author: liugui
 * @Date: 2020-11-06 10:47
 **/
public class MoveDemo {
    public static void main(String[] args) {
        try {
            Files.move(Paths.get("src/resource/2.txt"),
                    Paths.get("src/resource/txt/2.txt"),
                    StandardCopyOption.REPLACE_EXISTING);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
